window.JCAT.Script = function ()
{}



window.JCAT.Script.Load = function (sSrc)
{
	var aElementCollection = document.getElementsByTagName('head') ;
	if(aElementCollection.length==0)
	{
		throw new Error("Current Page Hasn't Head tag.");
	}
	else
	{
		var aHead = aElementCollection[0];
	}
	
	var aScript = document.createElement('script');
	aScript.type = "text/javascript";
	aScript.src = sSrc ;
	aHead.appendChild(aScript);
}


window.JCAT.Script.Import = function (sClassName)
{
	sSrc = JCAT.SOAP.SSMI.GetRequestURL('JCAT_Package','ImportJSClass',[sClassName]) ;
	this.Load(sSrc) ;
	
	var bSuc = false ;
	eval("bSuc = (typeof("+sClassName+")=='undefined')") ;
	return bSuc ;
}
